<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>文件上传</title>
    </head>
    <body>
        <form method="post" action="/ossupload" id="upload" enctype="multipart/form-data">
            <input name="file"  type="file" onchange="toupload()">
            <!--<input type="submit" value="提交上传">-->
        </form>

        <script>
            function toupload() {
                document.getElementById("upload").submit();
            }
        </script>
    </body>
</html>